<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de" lang="de">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Wizard-Show</title>
<link rel="stylesheet" href="../../css/default/screen.css" type="text/css" media="screen" />
<link rel="stylesheet" href="../../css/default/eed.css" type="text/css" media="screen" />
</head>
<body>
<!--##begin-->
<div id="wizard">

    #(inhalt)

    <!--versions-umschalter-->
    <span style="float:right;">
        <!--##hide-version_prev-->
        | <a href="!{link_first}">&lt;&lt;</a> | <a href="!{link_prev}">&lt;</a> |
        <!--##show-->
        g(version) !#ausgaben_vaktuell g(of) !#ausgaben_vgesamt
        <!--##hide-version_next-->
        | <a href="!{link_next}">&gt;</a> | <a href="!{link_last}">&gt;&gt;</a> |
        <!--##show-->
    </span>

    <div class="clearer">
        <a name="preview">&nbsp;</a>
    </div>


    <div id="vorschau" style="display:none;">
        <div id="substance"></div>
        <div class="clearer"></div>
    </div>

    <ul id="content_blocks">
        <!--##loop-sort_content-->
        <li id="item_!{key}" class="!{class}" style="!{style}">
            <a name="item_!{key}"></a>
            !{value_html}
            <div class="clearer"></div>
            <p class="block_edit" !{modify}>
                <a href="!{link_up}" class="button" title="#(wiz_moveup_desc)">#(wiz_moveup)</a>
                <a href="!{link_down}" class="button" title="#(wiz_movedown_desc)">#(wiz_movedown)</a>
                <a href="!{delete}" class="button" title="#(wiz_delete_desc)">#(wiz_delete)</a>
            </p>
            <div class="clearer"></div>
        </li>
        <!--##cont-->
    </ul>
    <div class="clearer"></div>

    <fieldset>
        <legend>#(add_block)</legend>
        <!--##loop-add_buttons-->
            <a href="!{link}" class="button">!{item}</a>
        <!--##cont-->
        <div class="clearer"></div>
    </fieldset>

    <!--##hide-default-->
    <fieldset class="buttons">
        <form method="post" action="!#ausgaben_form_aktion">
            <button type="button" onclick="preview();" class="button">g(preview)</button>
            <button type="submit" name="save[]" value="save" class="button">g(save)</button>
            <button type="submit" name="version[]" value="version" class="button">g(version)</button>
            <button type="submit" name="cancel[]" value="cancel" class="button">g(abort)</button>
        </form>
    </fieldset>
    <!--##show-->

    <!--##hide-edit-->
    <fieldset class="buttons">
        <form method="post" action="!#ausgaben_form_aktion">
            <button type="button" onclick="preview();" class="button">g(preview)</button>
            <button type="submit" name="version[]" value="version" class="button">g(save)</button>
            <button type="submit" name="cancel[]" value="cancel" class="button">g(abort)</button><br />
            <label class="cbra"><input type="checkbox" name="release_mark" value="-1" class="button" />#(ask_release)</label>
        </form>
    </fieldset>
    <!--##show-->

    <!--##hide-publish-->
    <fieldset class="buttons">
        <form method="post" action="!#ausgaben_form_aktion">
            <button type="button" onclick="preview();" class="button">g(preview)</button>
            <button type="submit" name="save[]" value="save" class="button">g(save)</button>
            <button type="submit" name="version[]" value="version" class="button">g(version)</button>
            <button type="submit" name="cancel[]" value="cancel" class="button">g(abort)</button>
            <label class="cbra"><input type="checkbox" name="release_mark" value="-1" class="button" />#(release)</label>
        </form>
    </fieldset>
    <!--##show-->

    <!--##hide-blocked-->
    <fieldset>
        <input type="checkbox" name="release_mark" value="-1" checked="true" disabled="true" />#(blocked_release)
    </fieldset>
    <!--##show-->

</div>

!#ausgaben_output
!#ausgaben_inaccessible

<script type="text/javascript">
    Sortable.create("content_blocks",
        {only: 'ajax_move',
            onUpdate:function(){
                new Ajax.Request(
                    '!#ausgaben_ajax_request?' + Sortable.serialize("content_blocks"),
                    {
                        onComplete:function(){
                            new Effect.Highlight("content_blocks",{startcolor: '#FEF6DE'});
                            location.reload(true);
                        }
                    }
                );
            }
        }
    );
    function preview() {
        if ( $('vorschau').style.display == 'none' ) {
            var update = new Ajax.Updater('substance',
                                        '!#ausgaben_form_aktion',
                                        {
                                            asynchronous:true,
                                            parameters: 'ajax=on&save[]=save',
                                            onSuccess:function(){
                                                new Effect.Parallel(
                                                    [
                                                        new Effect.BlindDown('vorschau'),
                                                        new Effect.BlindUp('content_blocks')
                                                    ]
                                                );
                                                self.location.href = '#preview';
                                            }
                                        }
            );
            return false;
        } else {
            new Effect.Parallel(
                [
                    new Effect.BlindUp('vorschau'),
                    new Effect.BlindDown('content_blocks')
                ]
            );
        }
    }
</script>
<!--##end-->
</body>
</html>